﻿<script type="text/javascript">
    $(function() {
        $("#bangfang_chaxun_chaoshi").click(function() {
            //查询
            var dateKaiShi = $("#bangfang_date_kaishi_chaoshi").datetimebox('getValue');
            var dateJieShu = $("#bangfang_date_jieshu_chaoshi").datetimebox('getValue');
            var zhanDian = $("#bangfang_zhandian_chaoshi").combobox('getValue');
            $("#bangfang_chaoshi").datagrid("load", { zhandian: zhanDian, kaishishijian: dateKaiShi, jieshushijian: dateJieShu, uid: window.uid, kid: window.kid });
        });
        $("#bangfang_daochu_chaoshi").click(function() {
            //导出
        });
        $("#bangfang_zhandian_chaoshi").combobox({
            url: 'json/zhandian.json',
            method: 'get',
            valueField: 'zhandian',
            textField: 'zhandian',
            panelWidth: 175,
            panelHeight: 'auto',
            editable: false,
            onLoadSuccess: function() {
                $("#bangfang_chaoshi").datagrid({ url: "handler/chengzhongchaoshi.ashx", method: "get", queryParams: { zhandian: $("#bangfang_zhandian_chaoshi").combobox('getValue'), kaishishijian: $("#bangfang_date_kaishi_chaoshi").datetimebox('getValue'), jieshushijian: $("#bangfang_date_jieshu_chaoshi").datetimebox('getValue'), uid: window.uid, kid: window.kid }, height: document.body.scrollHeight - 180 });
            }
        });

    });
    
    $.parser.onComplete = function() {
        var d = new Date();
        $("#bangfang_date_kaishi_chaoshi").datebox('setValue', d.toLocaleDateString());
        $("#bangfang_date_jieshu_chaoshi").datebox('setValue', d.toLocaleDateString());
    }
</script>
<div class="easyui-panel" data-options="height:90,border:false" title="数据检索" style="border-top-width: 0px;
    border-bottom-width: 1px; padding: 15px">
    <table style="font-size: 12px;">
        <tr>
        <td>
                站点：
            </td>
            <td>
                <input class="" name="bangfang_zhandian_chaoshi" id="bangfang_zhandian_chaoshi" style="width: 175px;" />
            </td>
            <td>
                称重时间：
            </td>
            <td>
                <input id="bangfang_date_kaishi_chaoshi" type="text" class="easyui-datebox" data-options="required:true,showSeconds:true"
                    style="width: 175px">
            </td>
            <td>
                至
            </td>
            <td>
                <input id="bangfang_date_jieshu_chaoshi" type="text" class="easyui-datebox" data-options="required:true,showSeconds:true"
                    style="width: 175px">
            </td>
            <td>
                <a id="bangfang_chaxun_chaoshi" class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                    style="width: 60px; margin-left: 20px;">查询</a>
            </td>
            <td>
               <!-- <a id="bangfang_daochu_chaoshi" class="easyui-linkbutton" data-options="iconCls:'icon-export-16'"
                    style="width: 60px">导出</a>-->
            </td>
        </tr>
    </table>
</div>
<table id="bangfang_chaoshi" class="easyui-datagrid" title="皮重超差查询" data-options="border:false,singleSelect:true,collapsible:false,striped:true">
    <thead>
        <tr>
            <th data-options="field:'chepaihao',width:100">
                车牌号
            </th>
            <th data-options="field:'jinchangshijian',width:180">
                进场时间
            </th>
            <th data-options="field:'chuchangshijian',width:180">
                出场时间
            </th>
             <th data-options="field:'tingliushijian',width:150,align:'right'">
                停留时间(分钟)
            </th>
        </tr>
    </thead>
</table>